Skip to content

libstore: Fix makeCopyPathMessage#13756

Merged
xokdvium merged 1 commit intoNixOS:masterfrom
xokdvium:fix-copy-path-message
Aug 14, 2025
Merged

libstore: Fix makeCopyPathMessage#13756
xokdvium merged 1 commit intoNixOS:masterfrom
xokdvium:fix-copy-path-message

Conversation

@xokdvium
Copy link
Contributor

Motivation

Old code completely ignored query parameters and it seems ok to keep that behavior. There's a lot of code out there that parses nix code like nix-output-monitor and it can't parse messages like:

copying path '/nix/store/wha2hi4yhkjmccqhivxavbfspsg1wrsj-source' from 'https://cache.nixos.org' to 'local://'...

Let's not break these tools without a good reason. This goes in line with what other code does by ignoring parameters in logs.

The issue is just in detecting the shorthand notations for the store reference - not in printing the url in logs.

By default the daemon opens a local store with ?path-info-cache-size=0, so that leads to the erronenous 'local://'.

Context

Broken in #13739 and not completely fixed in #13755


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

Old code completely ignored query parameters and it seems ok to keep
that behavior. There's a lot of code out there that parses nix code
like nix-output-monitor and it can't parse messages like:

> copying path '/nix/store/wha2hi4yhkjmccqhivxavbfspsg1wrsj-source' from 'https://cache.nixos.org' to 'local://'...

Let's not break these tools without a good reason. This goes in line
with what other code does by ignoring parameters in logs.

The issue is just in detecting the shorthand notations for the store
reference - not in printing the url in logs.

By default the daemon opens a local store with ?path-info-cache-size=0,
so that leads to the erronenous 'local://'.
@xokdvium xokdvium requested a review from Ericson2314 as a code owner August 14, 2025 21:57
@github-actions github-actions bot added the store Issues and pull requests concerning the Nix store label Aug 14, 2025
@xokdvium xokdvium enabled auto-merge August 14, 2025 21:57
@xokdvium xokdvium merged commit f64000e into NixOS:master Aug 14, 2025
14 checks passed
@xokdvium xokdvium deleted the fix-copy-path-message branch August 14, 2025 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

store Issues and pull requests concerning the Nix store

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants